<template>
    <div class="youke">
        <Navs left></Navs>
        <Main>
            <div class="body">
                <div class="post">
                    <textarea name="" id="" cols="30" rows="10" v-model="content"></textarea>
                    <van-button type="info" :disabled="content==''" @click="save">提交</van-button>
                </div>
                <!-- <div class="result">
                    <van-cell-group>
                        <van-cell title="申诉详情" value="2019-01-01 12：12"/>
                        <div class="content">Light Security是一个基于jwt的权限控制框架，支持与Spring Boot配合使用，支持Spring MVC与WebFlux</div>
                    </van-cell-group>
                </div> -->
            </div>

        </Main>
    </div>
</template>

<script>
import {trads} from '@/api'
    export default {
        data() {
            return {
                content:''
            }
        },
        methods:{
            save(){
                trads.appeal({content:this.content,did:this.$route.query.id}).then(res=>{
                     if(res.code==1000){
                           this.$toast.success(res.reason)
                           setTimeout(() => {
                                this.$router.go(-1)
                           }, 500);
                        this.content=''
                       
                     }
                })
            }

        }
    }
</script>

<style scoped lang="less">
    .body{
        padding-top: 1rem;
        .post{
            width: 94%;
            margin: 0 auto;
            textarea{
                width: 100%;
                height: 6rem;
                border:1px solid #AFAFAF;
                border-radius:5px;
            }
            button{
                width: 100%;
                border-radius: 4px;
            }
        }
        .result{
            background-color: #FFFFFF;
            .content{
                padding: 1rem;
                font-size: 14px;
                letter-spacing: 1px;
            }
            .van-cell:not(:last-child)::after{
                left: 0px;
            }
        }
    }

</style>
